package com.platform.license.client;

import com.platform.license.service.LicManager;
import de.schlichtherle.license.LicenseManager;
import de.schlichtherle.license.LicenseParam;

/**
 * Description: LicenseManager单例
 *
 * @author libinal Created on 2019/9/22
 */
public class LicenseManagerHolder {

    private static volatile LicenseManager LICENSE_MANAGER;

    public static LicenseManager getLicenseManager(LicenseParam param) {
        if (LICENSE_MANAGER == null) {
            synchronized (LicenseManagerHolder.class) {
                if (LICENSE_MANAGER == null) {
                    LICENSE_MANAGER = new LicManager(param);
                }
            }
        }
        return LICENSE_MANAGER;
    }
}
